/**
  **********************************************************************************************************************
  * @file    cot_task.h
  * @brief   该文件提供任务时间片论任务调度功能函数原型
  * @author  const_zpc    any question please send mail to const_zpc@163.com
  * @date    2023-06-21
  **********************************************************************************************************************
  *
  **********************************************************************************************************************
  */

/* Define to prevent recursive inclusion -----------------------------------------------------------------------------*/
#ifndef _COT_TASK_H_
#define _COT_TASK_H_

/* Includes ----------------------------------------------------------------------------------------------------------*/
#include <stdint.h>

/* Exported types ----------------------------------------------------------------------------------------------------*/

typedef void (*TaskRunCB)(void);

/* Exported constants ------------------------------------------------------------------------------------------------*/
/* Exported macro ----------------------------------------------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------------------------------------------------*/

extern void cotTask_Init(void);
extern void cotTask_Remarks(void);
extern void cotTask_Start(void);

extern void cotTask_Creat(TaskRunCB pfnTask, uint16_t time, uint8_t priority);
extern void cotTask_Destory(TaskRunCB pfnTask);

extern void cotTask_IsrCreat(TaskRunCB pfnTask, uint16_t time);
extern void cotTask_IsrDestory(TaskRunCB pfnTask);

extern uint8_t cotTask_GetLoadRate(void);
extern uint32_t cotTask_GetSysTimer(void);

#endif // !_COT_TASK_H_
